package com.toannv.helper;

import com.smartfoxserver.v2.entities.User;
import com.smartfoxserver.v2.entities.data.SFSObject;
import com.toannv.definitions.KeyObjectId;

public class UserHelper {
	public static int getLevel(User user){
		int level = 0;
		
		return level;
	}
	
	public static int getMoney(User user){
		int money = 0;
		
		return money;
	}
	
	public static String getName(User user){
		return user.getName();
	}
	
	public static SFSObject getObjectUser(User user){
		SFSObject sfsO = new SFSObject();
		
		sfsO.putInt(KeyObjectId.USER_LEVEL, UserHelper.getLevel(user));
		sfsO.putInt(KeyObjectId.USER_MONEY, UserHelper.getMoney(user));
		sfsO.putInt(KeyObjectId.USER_ID_IN_ROOM, user.getPlayerId());
		sfsO.putUtfString(KeyObjectId.USER_NAME, UserHelper.getName(user));
		
		return sfsO;
	}
}
